home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 49 / Amiga Format CD49 (2000-01-17)(Future Publishing)(GB)(Track 1 of 3)[!][issue 2000-02].iso / -serious- / graphics / gnuplot / gnuplot-3.7.1doc / demo / random.dem < prev    next >
Text File  |  1999-11-29  |  873b  |  36 lines

  1. #
  2. # $Id: random.dem,v 1.1.1.1 1998/04/15 19:16:42 lhecking Exp $
  3. #
  4. # random.dem
  5. #
  6. # Lattice test for random numbers;
  7. # If you can see any patterns in this plot, the random number generator
  8. # is not very good.
  9. #
  10. # Permission granted to distribute freely for non-commercial purposes only
  11. #
  12. # Copyright (c) 1991, Jos van der Woude, jvdwoude@hut.nl
  13. seed = 1317
  14. seed = rand(seed)
  15. set nokey
  16. set xrange [0: 1]
  17. set yrange [0: 1]
  18. set zrange [0: 1]
  19. set title "Lattice test for random numbers"
  20. set xlabel "rand(n) ->"
  21. set ylabel "rand(n + 1) ->"
  22. set zlabel "rand(n + 2) ->"
  23. set format x "%3.2f"
  24. set format y "%3.2f"
  25. set format z "%3.2f"
  26. set tics
  27. set sample 1000
  28. set function style dots
  29. set parametric
  30. plot rand(1), rand(1)
  31. pause -1 "Hit return to continue"
  32. pause 0 "3D plot ahead, one moment please ..."
  33. set sample 50
  34. splot rand(1), rand(1), rand(1)
  35. pause -1 "Hit return to continue"
  36.